﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Master/AdminDialog.Master" AutoEventWireup="true" CodeBehind="FieldTypeEdit.aspx.cs" Inherits="Besture.UI.Admin.CommonModel.FieldTypeEdit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" type="text/css" href="/Admin/Css/admin_style.css" />
    <script type="text/javascript">
        $(document).ready(function () {

            $(".ProClass").hide();
            $(".SingTextBox").show();
            
            $(".radioItem").change(function () {
                $(".ProClass").hide();
                var $selectedvalue = $("input[name='rblFieldType']:checked").val();
                //单行文本
                if ($selectedvalue == "1") {
                    $(".SingTextBox").show();
                }
                //多行文本
                else if ($selectedvalue == "2" || $selectedvalue == "3") {
                    $(".MultiTextBox").show();
                }
                //选项
                else if ($selectedvalue == "4") {
                    $(".Option").show();
                }
            });
        });
		</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

                <table width="98%" cellspacing="0" cellpadding="0" class="table_form">
                    <tr>
                        <th style="width: 150px">
                            字段类型：
                        </th>
                        <td>
                            <input id="rblFieldType_1" class="radioItem" checked="checked" name="rblFieldType" type="radio" value="1" /><label for="rblFieldType_1">单行文本</label>
                            <input id="rblFieldType_2" class="radioItem" name="rblFieldType" type="radio" value="2" /><label for="rblFieldType_2">多行文本（不支持HTML）</label>
                            <input id="rblFieldType_3" class="radioItem" name="rblFieldType" type="radio" value="3" /><label for="rblFieldType_3">多行文本（支持HTML）</label>
                            <input id="rblFieldType_4" class="radioItem" name="rblFieldType" type="radio" value="4" /><label for="rblFieldType_4">选项</label>
                        </td>
                    </tr>
                    <!--单行文本属性Start-->
                    <tr class="ProClass SingTextBox">
                        <th>最大字符数：</th>
                        <td>
                            <cms:TextBox ID="txtMaxLength" runat="server" WidthExt="Width_100" Text="200" Required="True" ValidateExt="Number"></cms:TextBox>
                        </td>
                    </tr>
                    <tr class="ProClass SingTextBox">
                        <th>文本框长度：</th>
                        <td>
                            <cms:TextBox ID="txtBoxLength" runat="server" WidthExt="Width_100" Text="200" Required="True" ValidateExt="Number"></cms:TextBox>
                        </td>
                    </tr>
                    <tr class="ProClass SingTextBox">
                        <th>验证规则：</th>
                        <td>
                            <asp:DropDownList runat="server" ID="ddlValidate">
                                <asp:ListItem runat="server" Text="无" Value="0"></asp:ListItem>
                                <asp:ListItem runat="server" Text="邮箱地址" Value="1"></asp:ListItem>
                                <asp:ListItem runat="server" Text="手机号码" Value="2"></asp:ListItem>
                                <asp:ListItem runat="server" Text="纯数字" Value="3"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr class="ProClass SingTextBox">
                        <th>默认值：</th>
                        <td>
                            <cms:TextBox ID="txtDefaultValue" runat="server" WidthExt="Width_400"></cms:TextBox>
                        </td>
                    </tr>
                    <!--单行文本属性End-->
                    
                    <!--多行文本属性Start-->
                    <tr class="ProClass MultiTextBox">
                        <th>显示宽度：</th>
                        <td>
                            <cms:TextBox ID="txtDisWidth" runat="server" WidthExt="Width_100" Text="500" Required="True" ValidateExt="Number"></cms:TextBox>
                        </td>
                    </tr>
                    <tr class="ProClass MultiTextBox">
                        <th>显示高度：</th>
                        <td>
                            <cms:TextBox ID="txtDisHeight" runat="server" WidthExt="Width_100" Text="80" Required="True" ValidateExt="Number"></cms:TextBox>
                        </td>
                    </tr>
                    <!--多行文本属性End-->
                    

                    <!--选项属性Start-->
                    <tr class="ProClass Option">
                        <th>选项值：</th>
                        <td>
                            <asp:TextBox ID="txtOptionValue" runat="server" TextMode="MultiLine" Width="400px" Height="100px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr class="ProClass Option">
                        <th>显示方式：</th>
                        <td>
                            <input id="rdOptionDis_1" class="radioOptionItem" checked="checked" name="rdOptionDisType" type="radio" value="1" /><label for="rdOptionDis_1">单选下拉列表框</label>
                            <input id="rdOptionDis_2" class="radioOptionItem" name="rdOptionDisType" type="radio" value="1" /><label for="rdOptionDis_2">单选按钮</label>
                            <input id="rdOptionDis_3" class="radioOptionItem" name="rdOptionDisType" type="radio" value="1" /><label for="rdOptionDis_3">复选框</label>
                        </td>
                    </tr>
                    <!--选项属性End-->
                    

                </table>

</asp:Content>
